import { createRouter, createWebHashHistory } from "vue-router";

const routes = [
  {
    path: "/",
    name: "Home",
    component: () => import("../views/Home.vue"),
    children: [
      {
        path: '/',
        name: 'indx',
        component: () => import('../views/index.vue')
      },
      {
        path : '/hme',
        name : 'hme',
        component : () => import("../views/hme.vue")
      },
      {
        path: "/create-student",
        name: "createStudent",
        component: () => import("../views/student/create-student.vue"),
      },
      {
        path: "/read-student",
        name: "readStudent",
        component: () => import("../views/student/read-student.vue"),
      },
      {
        path: "/updata-student",
        name: "updataStudent",
        component: () => import("../views/student/updata-student.vue"),
      },
      {
        path: "/create-teacher",
        name: "createTeacher",
        component: () => import("../views/teacher/create-teacher.vue"),
      },
      {
        path: "/read-teacher",
        name: "readTeacher",
        component: () => import("../views/teacher/read-teacher.vue"),
      },
      {
        path: "/update-teacher",
        name: "updataTeacher",
        component: () => import("../views/teacher/update-teacher.vue"),
      },
      {
        path : "/student-manage",
        name : "student-manage",
        component : () => import("../views/teacher/student-manage.vue")
      },
      {
        path: "/update-admin",
        name: "updateAdmin",
        component: () => import("../views/admin/update-admin.vue"),
      },
      {
        path: "/create-message",
        name: "createMessage",
        component: () => import("../views/admin/create-message.vue"),
      },
      {
        path: "/admin-message",
        name: "adminMessage",
        component: () => import("../views/admin/admin-message.vue"),
      },
      {
        path: "/settime",
        name: "settime",
        component: () => import("../views/admin/setTime.vue"),
      },
      {
        path: "/admin-chengji",
        name: "adminChengji",
        component: () => import("../views/admin/admin-chengji.vue"),
      },
      {
        path: "/create-admin",
        name: "createAdmin",
        component: () => import("../views/admin/create-admin.vue"),
      },
      {
        path: "/teacher-chengji",
        name: "teacherChengji",
        component: () => import("../views/teacher/teacher-chengji.vue"),
      },
      {
        path: "/teacher-excel",
        name: "teacher-excel",
        component: () => import("../views/teacher/teacher-excel.vue"),
      },
      {
        path: "/read-message",
        name: "readMessage",
        component: () => import("../views/admin/read-message.vue"),
      },
      {
        path: "/student-score",
        name: "student-score",
        component: () => import("../views/student/student-score.vue"),
      },
      {
        path : "/create-leave",
        name : "student-leave",
        component : () => import("../views/student/student-leave.vue"),
      },
      {
        path: "/teacher-feedback",
        name: "read-apply",
        component: () => import("../views/teacher/teacher-feedback.vue"),
      },
      {
        path: "/read-apply",
        name: "read-f",
        component: () => import("../views/admin/read-apply.vue"),
      },
      {
        path: "/student-feedback",
        name: "read-ts",
        component: () => import("../views/student/student-feedback.vue"), //  
      },
      {
        path : "/create-course" , 
        name : "create-course" , 
        component: () => import("../views/course/create-course.vue")  // 创建课程
      },
      {
        path : "/course-modifications" , 
        name : "course-modifications" , 
        component : () => import("../views/course/course-modifications.vue") // 课程修改
      },
      {
        path : "/check-course",
        name : "check-course",
        component : () => import("../views/course/check-course.vue") // 查看课程
      },
      {
        path : "/select-leave",
        name : "select-leave",
        component : () => import("../views/leave/select-leave.vue") // 查看请假
      },
      {
        path : "/read-student-leave",
        name : "read-student-leave",
        component : () => import("../views/leave/read-student-leave.vue")
      },
      {
        path : "/self-student",
        name : "self-student",
        component : () => import("../views/student/self-student.vue") // 所属班级
      }
    ],
  },
  {
    path: "/logn",
    name: "logn",
    component: () => import("../views/logn.vue"),
  },
];
const router = createRouter({
  history: createWebHashHistory(),
  routes,
});

export default router;
